<script lang="ts" setup>
  import i18n from '@/i18n'

  const locale = toRef(i18n.global, 'locale')
  const messages = toRef(i18n.global, 'messages')
</script>

<template>
  <el-config-provider
    :button="{
      autoInsertSpace: true,
    }"
    :locale="messages[locale]"
  >
    <router-view v-slot="{ Component }">
      <keep-alive>
        <component :is="Component" />
      </keep-alive>
    </router-view>
  </el-config-provider>
</template>
